﻿/*
 * AngularUnits
 * 
 * initial implementation : 20.11.2008
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;


namespace Petra.Gis.ReferenceSystemServices
{
  /// <summary>
  /// predefined angular units
  /// </summary>
  public partial class AngularUnit : MeasureUnit
  {
    /// <summary>
    /// The angular Degrees are PI/180 = 0.017453292519943295769236907684886 radians
    /// </summary>
    public static readonly AngularUnit Degrees = new AngularUnit(0.017453292519943295769236907684886, new Metadata("degree", "EPSG", 9102, "deg", String.Empty, "=pi/180 radians"));


    /// <summary>
    /// The angular Minutes = 1 / 60 / 180 * PI = 2.9088820866572159615394846141477e-4 radians
    /// </summary>
    //public static readonly AngularUnit Minutes = new AngularUnit(0.0002908882086657215961539484614, new Metadata("minutes", "EPSG", 9102, "min", String.Empty, "=2.9089402642989491058587154036923E-4 radians"));
    public static readonly AngularUnit Minutes = new AngularUnit(1.0 / 60.0 / 180.0 * Math.PI, new Metadata("minutes", "EPSG", 9102, "min", String.Empty, "=2.9089402642989491058587154036923E-4 radians"));


    /// <summary>
    /// The angular Seconds = 1 / 3600 / 180 * PI  = 4.8481368110953599358991410235795e-6 radians
    /// </summary>
    //public static readonly AngularUnit Seconds = new AngularUnit(1.3488602591112976702297051734503e-9, new Metadata("seconds", "EPSG", 9102, "sec", String.Empty, "=1.3488602591112976702297051734503e-9 radians"));
    public static readonly AngularUnit Seconds = new AngularUnit(1.0 / 3600.0 / 180.0 * Math.PI, new Metadata("seconds", "EPSG", 9102, "sec", String.Empty, " = 1 / 3600 / 180 * PI radians"));


    /// <summary>
    /// SI standard unit
    /// </summary>
    public static readonly AngularUnit Radian = new AngularUnit(1, new Metadata("radian", "EPSG", 9101, "rad", String.Empty, "SI standard unit."));



    /// <summary>
    /// Pi / 200 = 0.015707963267948966192313216916398 radians
    /// </summary>
    public static readonly AngularUnit Grad = new AngularUnit(0.015707963267948966192313216916398,  new Metadata("grad", "EPSG", 9105, "gr", String.Empty, "=pi/200 radians."));



    /// <summary>
    /// Pi / 200 = 0.015707963267948966192313216916398 radians
    /// </summary>		
    public static readonly AngularUnit Gon = new AngularUnit(0.015707963267948966192313216916398, new Metadata("gon", "EPSG", 9106, "g", String.Empty, "=pi/200 radians."));


  }
}
